{extend name="layout:base" /}
{block name="page_content"}
<section class="newsCenter">
    <div class="banner">
        <?php if(isset($tree_node['pc_banner_path'])): ?>
            <img src="{$site_root}{$tree_node.pc_banner_path}" alt="{$tree_node.title}">
        <?php else: ?>
            <img src="{$cdn_root}/static/index/img/banner_news.png" alt="{$tree_node.title}">
        <?php endif; ?>
    </div>
    <div class="center">
        <div class="else-title">
            {$tree_node.title}
            <span>&nbsp;/&nbsp;&nbsp;{$tree_node.name}</span>
            <ul>
                {volist name='tree_node.children' id='child'}
                    <li <?php if($cat_id==$child['id']) { echo('class="active"'); } ?> >
                        <?php if($child['id'] == $tree_node['default_second_category_id']): ?>
                            <a href="{:url('index')}">{$child.title}</a>
                        <?php else: ?>
                            <a href="{:url('index', ['cat_id' => $child['id']])}">{$child.title}</a>
                        <?php endif; ?>
                    </li>
                {/volist}
            </ul>
        </div>
        <?php if(!empty($hot_item)): ?>
            <div class="hotNews">
                <a href="{:url('read', ['id' => $hot_item['id']])}" class="news-out">
                    <div class="news-img">
                        <img src="{$site_root}{$hot_item.pc_cover_path}" alt="{$hot_item.title}">
                    </div>
                    <div class="content">
                        <p class="news-tit">{$hot_item.title}</p>
                        <p class="news-data">
                            <i class="icon icon-time-tit"></i>
                            <span>{$hot_item.create_date}</span>
                            <span>{$hot_item.create_hour}</span>
                            <i class="icon icon-see-tit"></i>
                            <span>{$hot_item.view_count}</span>
                        </p>
                        <p class="news-summary">{$hot_item.description}</p>
                        <button>了解详情 &gt;&gt;</button>
                    </div>
                </a>
            </div>
        <?php endif; ?>
        <?php if($res->count()): ?>
            <div class="normal">
                <ul>
                    <?php $list = $res->all(); ?>
                    {volist name="$list" id="vo"}
                        <li>
                            <a href="{:url('read', ['id' => $vo['id']])}" class="news-out">
                                <div class="news-img">
                                    <img src="{$site_root}{$vo.pc_cover_path}" alt="{$vo.title}">
                                </div>
                                <div class="content">
                                    <p class="news-tit">{$vo.title}</p>
                                    <p class="news-summary">{$vo.description}</p>
                                    <p class="news-data">
                                        <i class="icon icon-time"></i>
                                        <span>{$vo.create_date}</span>
                                        <span>{$vo.create_hour}</span>
                                        <i class="icon icon-see"></i>
                                        <span>{$vo.view_count}</span>
                                    </p>
                                </div>
                            </a>
                        </li>
                    {/volist}
                </ul>
            </div>
            <?php echo($res->render()); ?>
        <?php endif; ?>
    </div>
</section>
{/block}